<!--************************************************************ -->
<!--* 文件创建日期：2010                                  * -->
<!--* 文件修改日期：			                                   * -->
<!--************************************************************ -->
<!--JSP初始化设置-->
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.infomanage.po.*" %>
<%@page import="com.infomanage.vo.*" %>
<%@page import="com.infomanage.enums.*"%>
<%@page import="com.infomanage.service.tech.*"%>
<%@page import="com.infomanage.util.TimeUtil"%>
<%  response.addDateHeader("Expires", 0);response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache");%>
<%
	request.setCharacterEncoding("UTF-8");
	String itemId = request.getParameter("itemId");
    if(itemId == null) itemId = "";
    
    TechAccidentItem item = TechAccidentService.loadTechAccident(request, response, out);
    String deptName = "";
    String inputerName = "";
    String accidentDeptName = "";
    String accidentDetail = "";
    String accidentExperience = "";
    int accidentPersonNum = 0;
    String accidentPlace = "";
    String accidentProperty = "";
    int actionPersonNum = 0;
    String actionTime = "";
    String actionTotalTime = "";
    String callTime = "";
    int deptId = -1;
    String diePersonNames = "";
    int diePersonNum = 0;
    String highTempWorkTime = "";
    String hxqTime = "";
    String injuredPersonNames = "";
    int injuredPersonNum = 0;
    int inputerId = -1;
    String otherContent = "";
    int outDeadbodyNum = 0;
    String rescueCommanderName = "";
    String rescueDirectorName = "";
    String rescueTime = "";
    String restoreRoadwayTime = "";
    String returnTime = "";
    String saveMoney = "";
    String schematic = "";
    String timestamp = "";
    String treatDeptName = "";
    if(item != null) {
    	TechAccident bean = item.getBean();
		Department dept = item.getDept();
		Person inputer = item.getInputer();
		deptName = dept.getPath();
		inputerName = inputer.getName();
		accidentDeptName = bean.getAccidentDeptName();
		accidentDetail = bean.getAccidentDetail();
		accidentExperience = bean.getAccidentExperience();
		accidentPersonNum = bean.getAccidentPersonNum();
		accidentPlace = bean.getAccidentPlace();
		accidentProperty = bean.getAccidentProperty();
		actionPersonNum = bean.getActionPersonNum();
		actionTime = bean.getActionTime();
		actionTotalTime = bean.getActionTotalTime();
		callTime = bean.getCallTime();
		deptId = bean.getDeptId();
		diePersonNames = bean.getDiePersonNames();
		diePersonNum = bean.getDiePersonNum();
		highTempWorkTime = bean.getHighTempWorkTime();
		hxqTime = bean.getHxqTime();
		injuredPersonNames = bean.getInjuredPersonNames();
		injuredPersonNum = bean.getInjuredPersonNum();
		inputerId = bean.getInputerId();
		otherContent = bean.getOtherContent();
		outDeadbodyNum = bean.getOutDeadbodyNum();
		rescueCommanderName = bean.getRescueCommanderName();
		rescueDirectorName = bean.getRescueDirectorName();
		rescueTime = bean.getRescueTime();
		restoreRoadwayTime = bean.getRestoreRoadwayTime();
		returnTime = bean.getReturnTime();
		saveMoney = bean.getSaveMoney();
		schematic = bean.getSchematic();
		timestamp = bean.getTimestamp();
		treatDeptName = bean.getTreatDeptName();
    } 
%>
<html>
<head>
	<title>事故救援登记卡</title>
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">	
	<link href="../../css/table.css" rel="stylesheet" type="text/css">
	<link href="../../css/calendar.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="../../js/calendar.js"></script>
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript">
	   function init() {
		   if("" != "<%=itemId%>") { // 修改
		   }
	   }
	   // 提交
	   function doSubmit(){
		 	if("" == "<%=itemId%>") {
		 		form1.actionType.value = "add";
			}else {
		 		form1.actionType.value = "modify";
			}
		 	form1.submit();
	   }

	   function showError(error){
		   alert(error);
	   }

	   function showInfo(info){
		   alert(info);
		   window.returnValue = "ok";
		   window.close();
	   }
	   
	   function showLegend(pictureDir){
			var url = encodeURI("accident_legend.jsp?pictureDir="+pictureDir);
			var width = '700px';
			var height ='500px';
			var arg = "dialogHeight:" + height + ";dialogWidth:" + width + ";status:no;location:no;edge=sunken;center=yes;resizable=yes;Minimize=yes;Maximize=yes";
			var returnValue = window.showModalDialog(url, "", arg);
			if(returnValue){
				dataFrame.location.reload();
			}
		}
	</script>
</head>
<body  rightmargin="0" bottommargin="0" leftmargin="0" topmargin="0" onclick="clickBody();" onload="init();">
	<input type="hidden" name="actionType">
	<table class="dialogTable" cellpadding="0" cellspacing="0">
		<!-- 表头-->
		<tr class="dialogTableHeader">
			<td>事故救援登记卡</td>
		</tr>
		<!-- 表数据-->
		<tr class="dialogTableContent">
			<td height="100%">
				<div style="height: 100%;width: 100%;overflow: auto;">
				<!-- 数据项 -->
				<table class="dataTable">
					<col width="15%">
					<col width="30%">
					<col width="10%">
					<col width="18%">
					<col width="12%">
					<col width="15%">
					<tr>
						<td class="field">
							填报单位
						</td>
						<td colspan="1">
							<%=deptName %>
						</td>
						<td class="field">
							日期
						</td>
						<td colspan="3">
							<%=timestamp %>
						</td>
					</tr>
					<tr>
						<td class="field">
							事故单位名称
						</td>
						<td colspan="5">
							<%=accidentDeptName %>
						</td>
					</tr>
					<tr>
						<td class="field">
							事故发生地点
						</td>
						<td>
							<%=accidentPlace %>
						</td>
						<td class="field">
							遇险人员
						</td>
						<td>
							<%= accidentPersonNum%>
						</td>
						<td class="field">
							事故性质
						</td>
						<td>
							<%= accidentProperty%>
						</td>
					</tr>
					<tr>
						<td class="field">
							来电时间
						</td>
						<td>
							<%= TimeUtil.toFullTime(callTime)%>
						</td>
						<td class="field">
							遇难人数
						</td>
						<td>
							<%= diePersonNum%>&nbsp;名
						</td>
						<td class="field">
							招请人单位及姓名
						</td>
						<td>
							<%=treatDeptName %>
						</td>
					</tr>
					<tr>
						<td class="field">
							出动时间
						</td>
						<td>
							<%= TimeUtil.toFullTime(actionTime)%>
						</td>
						<td class="field">
							出动人数
						</td>
						<td>
							<%=actionPersonNum %>&nbsp;名
						</td>
						<td class="field">
							抢救总指挥
						</td>
						<td>
							<%=rescueCommanderName %>
						</td>
					</tr>
					<tr>
						<td class="field">
							返回队部时间
						</td>
						<td>
							<%= TimeUtil.toFullTime(returnTime)%>
						</td>
						<td class="field">
							出动总时间
						</td>
						<td>
							<%=actionTotalTime %>&nbsp;小时
						</td>
						<td class="field">
							救护队负责人
						</td>
						<td>
							<%= rescueDirectorName%>
						</td>
					</tr>
					<tr>
						<td class="field">
							事故现场情况及处理经过
						</td>
						<td height="150px" colspan="5">
							<textarea style="width: 100%;height: 100%;background-color:#dfe8f6" readonly><%=accidentDetail %></textarea>
						</td>
					</tr>
					<tr>
						<td class="field">
							主要经验与教训
						</td>
						<td height="80px" colspan="5">
							<textarea style="width: 100%;height: 100%;background-color:#dfe8f6" readonly><%=accidentExperience %></textarea>
						</td>
					</tr>
					<tr>
						<td class="field">
							事故现场示意图
						</td>
						<td height="120px" colspan="5">
							<a id="legend"  href="#" onclick="showLegend('<%=schematic %>');">查看图片</a>
						</td>
					</tr>
					<tr>
						<td class="field">
							抢险救灾
						</td>
						<td>
							<%= rescueTime%>&nbsp;小时
						</td>
						<td class="field">
							佩用呼吸器时间
						</td>
						<td>
							<%= hxqTime%>&nbsp;小时
						</td>
						<td class="field">
							高温工作时间
						</td>
						<td>
							<%= highTempWorkTime%>&nbsp;小时
						</td>
					</tr>
					<tr>
						<td class="field">
							恢复巷道
						</td>
						<td>
							<%= restoreRoadwayTime%>&nbsp;米
						</td>
						<td class="field">
							挽回经济损失
						</td>
						<td>
							<%=saveMoney %>&nbsp;万元
						</td>
						<td class="field">
							其它内容
						</td>
						<td>
							<%= otherContent%>
						</td>
					</tr>
					<tr>
						<td class="field">
							运出尸体
						</td>
						<td>
							<%=outDeadbodyNum %>&nbsp;具
						</td>
						<td class="field">
							姓名
						</td>
						<td colspan="3">
							<%=diePersonNames %>
						</td>
					</tr>
					<tr>
						<td class="field">
							救出受伤
						</td>
						<td>
							<%=injuredPersonNum %>&nbsp;人
						</td>
						<td class="field">
							姓名
						</td>
						<td colspan="3">
							<%=injuredPersonNames %>
						</td>
					</tr>
					<tr>
						<td class="field">
							填表人
						</td>
						<td colspan="5">
							<%=inputerName %>
						</td>
					</tr>
				</table>
				</div>
			</td>
		</tr>
		<tr>
			<td  class="tableBtn">
				<span onclick="window.print();">打印</span>			
				<span onclick="window.close();">关闭</span>
			</td>
		</tr>
		<tr valign="top">
			<td colspan="2">
				&nbsp;
			</td>
		</tr>
	</table>
	<iframe src="#" frameborder="0" id="treeFrame" name="frame" style="display: none;position: absolute;"></iframe>
	<iframe src="#" name="actionFrame" style="display: none;"></iframe>
</body>
</html>